// @ts-expect-error defineFakeRoute
import { defineFakeRoute } from "vite-plugin-fake-server/client";

export default defineFakeRoute([
  {
    url: "/menus",
    method: "get",
    response: () => {
      return {
        code: 200,
        message: "success",
        data: [
          {
            path: "/home",
            element: "/home/index",
            type: "menu",
            meta: {
              key: "home",
              title: "首页",
              icon: "HomeOutlined",
              isLink: "",
              isKeepAlive: false,
              isHide: false,
              isAffix: true,
              isFull: false
            }
          },
          {
            path: "/dataScreen/index",
            element: "/dataScreen/index",
            meta: {
              key: "dataScreen",
              icon: "PieChartOutlined",
              title: "数据大屏",
              isLink: "",
              isKeepAlive: false,
              isHide: false,
              isAffix: false,
              isFull: false
            }
          },
          {
            path: "/list",
            redirect: "/list/useProTable",
            meta: {
              key: "list",
              icon: "TableOutlined",
              title: "列表页面",
              isLink: "",
              isKeepAlive: false,
              isHide: false,
              isAffix: false,
              isFull: false
            },
            children: [
              {
                path: "/list/useProTable",
                element: "/list/useProTable/index",
                meta: {
                  key: "useProTable",
                  icon: "AppstoreOutlined",
                  title: "路由缓存 ProTable",
                  isLink: "",
                  isKeepAlive: true,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              },
              {
                path: "/list/useDragTable",
                element: "/list/useDragTable/index",
                meta: {
                  key: "useDragTable",
                  icon: "AppstoreOutlined",
                  title: "使用 DragTable",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              },
              {
                path: "/list/useProList",
                element: "/list/useProList/index",
                meta: {
                  key: "ProList",
                  icon: "AppstoreOutlined",
                  title: "使用 ProList",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              }
            ]
          },
          {
            path: "/menu",
            redirect: "/menu/menu1",
            meta: {
              key: "menu",
              icon: "ProfileOutlined",
              title: "菜单嵌套",
              isLink: "",
              isKeepAlive: false,
              isHide: false,
              isAffix: false,
              isFull: false
            },
            children: [
              {
                path: "/menu/menu1",
                element: "/menu/menu1/index",
                meta: {
                  key: "menu1",
                  icon: "AppstoreOutlined",
                  title: "路由缓存 菜单1",
                  isLink: "",
                  isKeepAlive: true,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              },
              {
                path: "/menu/menu2",
                redirect: "/menu/menu2/menu21",
                meta: {
                  key: "menu2",
                  icon: "AppstoreOutlined",
                  title: "菜单2",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                },
                children: [
                  {
                    path: "/menu/menu2/menu21",
                    element: "/menu/menu2/menu21/index",
                    meta: {
                      key: "menu21",
                      icon: "AppstoreOutlined",
                      title: "路由缓存 菜单2-1",
                      isLink: "",
                      isKeepAlive: true,
                      isHide: false,
                      isAffix: false,
                      isFull: false
                    }
                  },
                  {
                    path: "/menu/menu2/menu22",
                    redirect: "/menu/menu2/menu22/menu221",
                    meta: {
                      key: "menu22",
                      icon: "AppstoreOutlined",
                      title: "菜单2-2",
                      isLink: "",
                      isKeepAlive: false,
                      isHide: false,
                      isAffix: false,
                      isFull: false
                    },
                    children: [
                      {
                        path: "/menu/menu2/menu22/menu221",
                        element: "/menu/menu2/menu22/menu221/index",
                        meta: {
                          key: "menu221",
                          icon: "AppstoreOutlined",
                          title: "路由缓存 菜单2-2-1",
                          isLink: "",
                          isKeepAlive: true,
                          isHide: false,
                          isAffix: false,
                          isFull: false
                        }
                      },
                      {
                        path: "/menu/menu2/menu22/menu222",
                        element: "/menu/menu2/menu22/menu222/index",
                        meta: {
                          key: "menu222",
                          icon: "AppstoreOutlined",
                          title: "菜单2-2-2",
                          isLink: "",
                          isKeepAlive: false,
                          isHide: false,
                          isAffix: false,
                          isFull: false
                        }
                      }
                    ]
                  },
                  {
                    path: "/menu/menu2/menu23",
                    element: "/menu/menu2/menu23/index",
                    meta: {
                      key: "menu23",
                      icon: "AppstoreOutlined",
                      title: "菜单2-3",
                      isLink: "",
                      isKeepAlive: false,
                      isHide: false,
                      isAffix: false,
                      isFull: false
                    }
                  }
                ]
              },
              {
                path: "/menu/menu3",
                element: "/menu/menu3/index",
                meta: {
                  key: "menu3",
                  icon: "AppstoreOutlined",
                  title: "按钮权限 菜单3",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              }
            ]
          },
          {
            path: "/system",
            redirect: "/system/user",
            type: "dir",
            meta: {
              title: "系统管理",
              icon: "SettingOutlined",
              key: "system",
              isAffix: false,
              isFull: false,
              isHide: false,
              isLink: ""
            },
            children: [
              {
                path: "/system/user",
                element: "/system/user/index",
                type: "menu",
                meta: {
                  key: "user",
                  title: "用户管理",
                  icon: "UserOutlined",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              },
              {
                path: "/system/role",
                element: "/system/role/index",
                type: "menu",
                meta: {
                  key: "role",
                  title: "角色管理",
                  icon: "TeamOutlined",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              },
              {
                path: "/system/menu",
                element: "/system/menu/index",
                type: "menu",
                meta: {
                  key: "menu",
                  title: "菜单管理",
                  icon: "MenuOutlined",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              },
              {
                path: "/system/permission",
                element: "/system/permission/index",
                type: "menu",
                meta: {
                  key: "permission",
                  title: "权限管理",
                  icon: "SolutionOutlined",
                  isLink: "",
                  isKeepAlive: false,
                  isHide: false,
                  isAffix: false,
                  isFull: false
                }
              }
            ]
          }
        ]
      };
    }
  }
]);
